package org.scs.carleton.ca.pgdt.core.internal.parser;

/**
 * An AST Location is a location in the source file.
 * 
 * @author tessierj
 *
 */
public class ASTLocation {
	private int beginLine, beginColumn, endLine, endColumn;
	
	public ASTLocation(Token token) {
		beginLine = token.beginLine;
		beginColumn = token.beginColumn;
		endLine = token.endLine;
		endColumn = token.endColumn;
	}

	/**
	 * Obtains the starting line number
	 * 
	 * @return
	 */
	public int getBeginLine() {
		return beginLine;
	}

	/**
	 * Returns the starting column number
	 * 
	 * @return
	 */
	public int getBeginColumn() {
		return beginColumn;
	}

	/**
	 * Returns on which line this node ends
	 * 
	 * @return
	 */
	public int getEndLine() {
		return endLine;
	}

	/**
	 * returns the ending column
	 * 
	 * @return
	 */
	public int getEndColumn() {
		return endColumn;
	}
}
